package com.itheima.charstream1;

import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;

public class CharStreamDemo10 {
    public static void main(String[] args) throws IOException {
        BufferedWriter bw = new BufferedWriter(new FileWriter("CharStream\\a.txt"));

        char[] chars = {97, 98, 99, 100, 101, 102};
        bw.write(97);
        bw.newLine();
        bw.write(chars);
        bw.newLine();
        bw.write(chars, 0 ,3);
        bw.newLine();
        bw.write("黑马程序员");
        bw.newLine();
        String str = "abcdefg";
        bw.write(str);
        bw.newLine();
        bw.write(str, 0, 5);
        bw.newLine();

        bw.flush();
        bw.close();
    }
}
